<template>
	<view class="bg_fff mb-20 itemBox" @click.stop="clckItem">
		<view class="display_row_btn_center">
			<view class="f_30 sn">
				{{dataItem.order_sn||""}}
			</view>
			<text class="c_999999 f_24"
				style="margin-right: 20rpx;">{{dataItem.order_type==0?'我的收益':(dataItem.order_type==1?"团队收益":"更多")}}</text>
		</view>
		<u-divider :customStyle="{margin:'0px'}"></u-divider>
		<view class="pd-20 display_row_btn_center" style="padding-right: 0;">
			<view class="itemBaseBox">
				<u-image :src="dataItem.mission_cover" width="130rpx" height="130rpx"></u-image>
				<view class="itemBase f_28">
					<text class="c_333333 title">{{dataItem.keyword_name||""}}</text>
					<text class="c_999999 f-24">平台：{{dataItem.platInfo.name||""}}</text>
					<text class="c_999999 f-24"
						v-if="dataItem.order_type!=0">推广人：{{dataItem.userInfo.username||""}}</text>
					<text class="c_999999 f-24">创建时间：{{showTime(dataItem.order_create_at)}}</text>
				</view>
			</view>
			<view style="flex: 1;margin-right: 20rpx;" class="display_col_center">
				<text></text>
				<text class="c_C62B2C f_34"
					style="font-weight: 600;">￥{{dataItem.order_type==0?dataItem.amount:(dataItem.order_type==1?dataItem.user_up_amount:dataItem.amount)}}</text>

			</view>
		</view>
		<u-divider :customStyle="{margin:'0px'}"></u-divider>
		<view class="display_row_btn_center" style="justify-content: space-around;padding: 10rpx 0;">
			<view class="c_999999 f-24">搜索量：{{dataItem.search_count}}</view>
			<view class="c_999999 f-24">成单量：{{dataItem.order_count}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "MissionItem",
		props: {
			dataItem: {
				type: Object,
				default: null
			}
		},
		data() {
			return {

			};
		},
		methods: {
			clckItem() {
				this.$emit("clickItem", this.dataItem);
			},
			showTime(time) {
				return time.substring(0, 11)
			}
		}
	}
</script>

<style scoped>
	.itemBox {
		width: 96%;
		border-radius: 20rpx;
		box-sizing: border-box;
		margin-left: 2%;
	}

	.itemBaseBox {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
	}

	.itemBase {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		margin-left: 20rpx;
		flex: 2;
	}

	.title {
		font-size: 36rpx;
		font-weight: 600;
	}

	.status {
		border: 1px solid #C62B2C;
		border-radius: 10rpx;
		padding: 10rpx;
	}

	.sn {
		padding: 20rpx 25rpx;
	}
</style>
